#ifndef __BASICINTERFACE_H__
#define __BASICINTERFACE_H__
#include <stdint.h>
#include <exception>
#include "EnvSetting.h"
class _ENDL
{
};
extern _ENDL endl;
#ifdef USE_BASICIO
class BasicIO
{
	public:
		enum Resault
		{
			Succ,//操作成功
			Fail,//操作失败
			Refuse,//拒绝操作
			Timeout,//操作超时
			Undefind,//操作未定义
		};
		virtual Resault Read(const uint32_t address, void* buffer, uint32_t length) const;
		virtual Resault Write(const uint32_t address, const void* buffer, uint32_t length) const;
		virtual const BasicIO& operator >> (uint32_t& Data) const;
		virtual const BasicIO& operator << (const uint32_t Data) const;
		virtual Resault Command(const uint32_t cmd, ...) const;
		class UndefinedCall: public std::exception
		{
			public:
				virtual const char* what() const throw();
		};
		
};
#endif
#ifdef USE_BASICDEBUG
class BasicDebug
{
  public:
    virtual int Write(const void* buffer, uint32_t length) const;
    virtual uint32_t Printf(const char*,...) const = 0;
};
#endif
#endif
